import {StackActions, NavigationActions} from 'react-navigation';

const reset = (navigation, routeName) => {
    const resetAction = StackActions.reset({
        index: 0,
        actions: [NavigationActions.navigate({ routeName })]
    });
    navigation.dispatch(resetAction);
};



const replace = (navigation,routeName,param)=>{
    navigation.dispatch(
        StackActions.replace(routeName,param)
    );
}




export {
    reset,
    replace,
}
